package com.weic.easycache.framework.web;

import com.weic.easycache.framework.Config;

public class ApiStatus {
	public final int code;
	public final String message;

	public ApiStatus(int code, String message) {
		this.code = code;
		this.message = message;
	}

	public static boolean isUserInvalid(int code) {
		for(ApiStatus status : Config.get().getUserInvalidStatus()) {
			if(code == status.code) {
				return true;
			}
		}
		return false;
	}

	public static boolean isIrgnored(int code) {
		for(ApiStatus status : Config.get().getIrgnoreStatus()) {
			if(code == status.code) {
				return true;
			}
		}
		return false;
	}
}
